package com.xishu.entity.order;

import com.xishu.annotation.dao.Search;
import com.xishu.entity.AbstractEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * 订单以及品类的映射关系，用做报表
 */
@Entity(name = "order_catalog_mapping")
@Table(indexes = {@Index(columnList = "createTime"), @Index(columnList = "orderId")})
public class OrderCatalogMapping extends AbstractEntity {
    @ApiModelProperty(value = "订单ID")
    private Long orderId;

    @ApiModelProperty(value = "分店的ID")
    private Long shopId;

    @ApiModelProperty(value = "分类的ID")
    private Long catalogId;

    @ApiModelProperty(value = "分类的名称")
    @Search(ignore = true)
    private String catalogName;

    @ApiModelProperty(value = "分类的中文名称")
    @Search(ignore = true)
    private String catalogName_zh;

    @ApiModelProperty(value = "分类的英文名称")
    @Search(ignore = true)
    private String catalogName_en;

    @ApiModelProperty(value = "金额")
    private Double cash;

    @ApiModelProperty(value = "父订单的ID,如果本身是父订单，那么订单号也是父订单号")
    private Long parentOrderId;

    @ApiModelProperty(value = "品类下面菜的份数")
    private Integer catalogCount;

    public Integer getCatalogCount() {
        return catalogCount;
    }

    public void setCatalogCount(Integer catalogCount) {
        this.catalogCount = catalogCount;
    }

    public Long getParentOrderId() {
        return parentOrderId;
    }

    public void setParentOrderId(Long parentOrderId) {
        this.parentOrderId = parentOrderId;
    }

    public String getCatalogName_zh() {
        return catalogName_zh;
    }

    public void setCatalogName_zh(String catalogName_zh) {
        this.catalogName_zh = catalogName_zh;
    }

    public String getCatalogName_en() {
        return catalogName_en;
    }

    public void setCatalogName_en(String catalogName_en) {
        this.catalogName_en = catalogName_en;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getCatalogId() {
        return catalogId;
    }

    public void setCatalogId(Long catalogId) {
        this.catalogId = catalogId;
    }

    public String getCatalogName() {
        return catalogName;
    }

    public void setCatalogName(String catalogName) {
        this.catalogName = catalogName;
    }

    public Double getCash() {
        return cash;
    }

    public void setCash(Double cash) {
        this.cash = cash;
    }
}
